//
//  GYXDemoViewController.swift
//  GYXWeibo
//
//  Created by Twisal on 2016/11/14.
//  Copyright © 2016年 Twisal. All rights reserved.
//

import UIKit

class GYXDemoViewController: GYXBaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        title = "第\(navigationController?.childViewControllers.count ?? 0)个"
    }
    
    @objc fileprivate func showNextVc() {
        let vc = GYXDemoViewController()
        navigationController?.pushViewController(vc, animated: true)
    }

}


extension GYXDemoViewController {
    override func setupTableView() {
        super.setupTableView()
//        navigationItem.rightBarButtonItem = UIBarButtonItem(title: "下一个", style: .plain, target: self, action: #selector(showNextVc))
        naviItem.rightBarButtonItem = UIBarButtonItem(title: "下一个", target: self, action: #selector(showNextVc))
    }
}
